package com.ruoyi.common.entity.TransactionEntity;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 优惠券类型管理对象 coupon_info
 * 
 * @author x
 * @date 2025-08-07
 */
public class CouponInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 优惠券描述 */
    @Excel(name = "优惠券描述")
    private String description;

    /** 优惠券类型（1: 无门槛券, 2: 满减券, 3: 折扣券, 4: 特定商品券） */
    @Excel(name = "优惠券类型", readConverterExp = "1=:,无=门槛券,,2=:,满=减券,,3=:,折=扣券,,4=:,特=定商品券")
    private Long couponType;

    /** 折扣比例（如8折=0.8，仅折扣券使用） */
    @Excel(name = "折扣比例", readConverterExp = "如=8折=0.8，仅折扣券使用")
    private BigDecimal discountRate;

    /** 优惠金额（折扣券可为空） */
    @Excel(name = "优惠金额", readConverterExp = "折=扣券可为空")
    private BigDecimal discountAmount;

    /** 最低使用金额限制 */
    @Excel(name = "最低使用金额限制")
    private BigDecimal minimumOrderAmount;

    /** 适用的商品（spu_Id） */
    @Excel(name = "适用的商品", readConverterExp = "s=pu_Id")
    private Long applicableScope;

    /** 门店限制（0不限门店，其他数字表示门店ID） */
    @Excel(name = "门店限制", readConverterExp = "0=不限门店，其他数字表示门店ID")
    private Long storeLimitType;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validFrom;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validTo;

    /** 发放总数量 */
    @Excel(name = "发放总数量")
    private Long totalCount;

    /** 每个用户限领次数 */
    @Excel(name = "每个用户限领次数")
    private Long limitPerUser;

    /** 是否可叠加使用（0-否，1-是） */
    @Excel(name = "是否可叠加使用", readConverterExp = "0=-否，1-是")
    private Long isStackable;

    /** 使用说明 */
    private String useDescription;

    /** 显示排序优先级 */
    private Long showOrder;

    /** 状态（1启用，0禁用） */
    @Excel(name = "状态", readConverterExp = "1=启用，0禁用")
    private Long status;

    /** 删除标志（0未删除，1已删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setCouponType(Long couponType) 
    {
        this.couponType = couponType;
    }

    public Long getCouponType() 
    {
        return couponType;
    }

    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }

    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }

    public void setMinimumOrderAmount(BigDecimal minimumOrderAmount) 
    {
        this.minimumOrderAmount = minimumOrderAmount;
    }

    public BigDecimal getMinimumOrderAmount() 
    {
        return minimumOrderAmount;
    }

    public void setApplicableScope(Long applicableScope) 
    {
        this.applicableScope = applicableScope;
    }

    public Long getApplicableScope() 
    {
        return applicableScope;
    }

    public void setStoreLimitType(Long storeLimitType) 
    {
        this.storeLimitType = storeLimitType;
    }

    public Long getStoreLimitType() 
    {
        return storeLimitType;
    }

    public void setValidFrom(Date validFrom) 
    {
        this.validFrom = validFrom;
    }

    public Date getValidFrom() 
    {
        return validFrom;
    }

    public void setValidTo(Date validTo) 
    {
        this.validTo = validTo;
    }

    public Date getValidTo() 
    {
        return validTo;
    }

    public void setTotalCount(Long totalCount) 
    {
        this.totalCount = totalCount;
    }

    public Long getTotalCount() 
    {
        return totalCount;
    }

    public void setLimitPerUser(Long limitPerUser) 
    {
        this.limitPerUser = limitPerUser;
    }

    public Long getLimitPerUser() 
    {
        return limitPerUser;
    }

    public void setIsStackable(Long isStackable) 
    {
        this.isStackable = isStackable;
    }

    public Long getIsStackable() 
    {
        return isStackable;
    }

    public void setUseDescription(String useDescription) 
    {
        this.useDescription = useDescription;
    }

    public String getUseDescription() 
    {
        return useDescription;
    }

    public void setShowOrder(Long showOrder) 
    {
        this.showOrder = showOrder;
    }

    public Long getShowOrder() 
    {
        return showOrder;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("description", getDescription())
            .append("couponType", getCouponType())
            .append("discountRate", getDiscountRate())
            .append("discountAmount", getDiscountAmount())
            .append("minimumOrderAmount", getMinimumOrderAmount())
            .append("applicableScope", getApplicableScope())
            .append("storeLimitType", getStoreLimitType())
            .append("validFrom", getValidFrom())
            .append("validTo", getValidTo())
            .append("totalCount", getTotalCount())
            .append("limitPerUser", getLimitPerUser())
            .append("isStackable", getIsStackable())
            .append("useDescription", getUseDescription())
            .append("showOrder", getShowOrder())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
